package com.example.administrator.myapplication.data.source.local;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

/**
 * Created by Administrator on 2017/11/27.
 */
public class TaskDbHelper extends SQLiteOpenHelper {

    private static final String DB_NAME = "DB_PIPE";
    private static final int VERSION = 1;
    private static final String SQL_CREATE_TABLE =
            "CREATE TABLE PIPE (" +
            "id varchar(20) PRIMARY KEY,name varchar(20),position varchar(20),pipeOut INTEGER," +
                    "brand varchar(20),consumption REAL,date Long,imgPath varchar(20))";




    public TaskDbHelper(Context context) {
        super(context, DB_NAME, null, VERSION);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
        db.execSQL(SQL_CREATE_TABLE);
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

    }
}
